package kassiopeia.agent.seda.config;

import kassiopeia.agent.seda.event.EventQueue;
import kassiopeia.commons.model.task.Connection;
import kassiopeia.plugin.Event;

public class SedaConnection {
    private String from;
    private String output;
    private EventQueue queue;

    public SedaConnection(Connection connection, EventQueue queue) {
        this(connection.getFromPlugin(), connection.getFromPluginOutput(), queue);
    }

    public SedaConnection(String from, String output, EventQueue queue) {
        this.from = from;
        this.output = output;
        this.queue = queue;
    }

    public void send(Event event) {
        queue.putEvent(event);
    }
    
    public String getFrom() {
        return from;
    }

    public void setFrom(String from) {
        this.from = from;
    }

    public String getOutput() {
        return output;
    }

    public void setOutput(String output) {
        this.output = output;
    }

    public EventQueue getQueue() {
        return queue;
    }

    public void setQueue(EventQueue queue) {
        this.queue = queue;
    }
}
